<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>案例1 基础列表渲染</title>
    <script src="../js/vue.js"></script>
  </head>
  <body>
    <!-- div id="app" 挂载点 -->
    <div id="app">
      <h1>基础列表渲染</h1>
      <ul>
        <li v-for="item in items" :key="item.id">
          学号: {{item.id }} --- 姓名: {{item.name}}
        </li>
      </ul>
    </div>
    <!-- 使用 javascript 脚本 -->
    <script type="text/javascript">
      var vm = new Vue({
        // 挂载点
        el: "#app",
        // 数据
        data: {
          // 数据
          items: [
            { id: 202319180601, name: "陈全扬" },
            { id: 202319180602, name: "陈严标" },
            { id: 202319180603, name: "陈宇" },
            { id: 202319180604, name: "陈宇航" },
          ],
        },
      });
    </script>
  </body>
</html>
